package com.minelx.animator.animators;

import java.util.ArrayList;
import java.util.List;

public class ToggleAnimatorBuilder extends AnimatorBuilder<ToggleAnimatorBuilder> { // FIXME 2020/4/15  wait for me!!!  addListener

	private final List<RepeatableAnimator> toggleItems;

	public ToggleAnimatorBuilder() {
		toggleItems = new ArrayList<>();
	}

	public ToggleAnimatorBuilder addToggle(RepeatableAnimator toggleItem) {
		toggleItems.add(toggleItem);
		return this;
	}

	@Override
	public ToggleAnimator build() {
		return new ToggleAnimator(toggleItems);
	}

	@Override
	protected ToggleAnimatorBuilder self() {
		return this;
	}
}
